<template>
  <div id="basicLayout">
    <a-layout style="min-height: 100vh">
      <a-layout-header class="header">
        <GlobalHeader />
      </a-layout-header>
      <a-layout>
        <GlobalSider class="sider" />
        <a-layout-content class="content">
          <router-view />
        </a-layout-content>
      </a-layout>
      <a-layout-footer class="footer">
        <a href="https://gitee.com/sunnfun" target="_blank"> 胡图图 by sunnfun </a>
      </a-layout-footer>
    </a-layout>
  </div>
</template>

<script lang="ts" setup>
import GlobalHeader from '@/components/GlobalHeader.vue'
import GlobalSider from '@/components/GlobalSider.vue'
</script>

<style scoped>
#basicLayout .header {
  padding-inline: 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 228, 228, 0.5);
  position: relative;
  z-index: 10;
}

#basicLayout .sider {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 228, 228, 0.5);
  padding-top: 24px;
  position: relative;
  z-index: 5;
}

#basicLayout :deep(.ant-menu-root) {
  border: none !important;
  background: transparent;
}

#basicLayout .content {
  padding: 32px;
  background: rgba(255, 255, 255, 0.8);
  min-height: calc(100vh - 134px);
  margin: 24px;
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(255, 182, 182, 0.1),
    0 0 0 1px rgba(255, 228, 228, 0.5);
  position: relative;
  backdrop-filter: blur(10px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

#basicLayout .content:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(255, 182, 182, 0.15),
    0 0 0 1px rgba(255, 228, 228, 0.6);
}

#basicLayout .footer {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  padding: 24px;
  position: relative;
  text-align: center;
  color: rgba(0, 0, 0, 0.65);
  box-shadow: 0 -4px 20px rgba(255, 182, 182, 0.1);
}

#basicLayout .footer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff9a9e, #fad0c4, #ff9a9e);
  opacity: 0.5;
}

#basicLayout .footer a {
  color: #d4463d;
  transition: all 0.3s;
  position: relative;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

#basicLayout .footer a:hover {
  color: #ff3d32;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 70, 61, 0.2);
}

:deep(.ant-layout) {
  background: linear-gradient(135deg, #fff6f6 0%, #fff9f9 100%);
  position: relative;
  overflow: hidden;
}

:deep(.ant-layout::before) {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(#ffe4e4 1px, transparent 1px),
    radial-gradient(#ffe4e4 1px, transparent 1px);
  background-size: 40px 40px;
  background-position:
    0 0,
    20px 20px;
  opacity: 0.3;
  pointer-events: none;
}

#basicLayout .content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
  border-radius: inherit;
  backdrop-filter: blur(10px);
  z-index: -1;
}

/* 添加滚动条样式 */
:deep(::-webkit-scrollbar) {
  width: 8px;
  height: 8px;
}

:deep(::-webkit-scrollbar-track) {
  background: rgba(255, 228, 228, 0.1);
  border-radius: 4px;
}

:deep(::-webkit-scrollbar-thumb) {
  background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  border-radius: 4px;
  transition: all 0.3s;
}

:deep(::-webkit-scrollbar-thumb:hover) {
  background: linear-gradient(135deg, #ff8589 0%, #f8c1b3 100%);
}
</style>
